<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label for="c-type_id" class="control-label col-xs-12 col-sm-2">{:__('Type_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-type_id" name="type_id" class="form-control">
                {volist name="ad_types" id="type"}
                <option value="{$key}" {$row.type_id==$key?'selected':''}>{$type}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="c-cat_id" class="control-label col-xs-12 col-sm-2">{:__('Cat_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-cat_id" name="cat_id" class="form-control">
                {volist name="cats" id="cat"}
                <option value="{$key}" {$row.cat_id==$key?'selected':''}>{$cat}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="c-ad_name" class="control-label col-xs-12 col-sm-2">{:__('Ad_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ad_name" data-rule="required" class="form-control" name="ad_name" type="text" value="{$row.ad_name}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-summary" class="control-label col-xs-12 col-sm-2">{:__('Summary')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea name="summary" id="c-summary" cols="30" rows="10" class="form-control">{$row.summary}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label for="c-width" class="control-label col-xs-12 col-sm-2">{:__('Width')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-width" class="form-control" name="width" type="text" value="{$row.width}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-height" class="control-label col-xs-12 col-sm-2">{:__('Height')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-height" class="form-control" name="height" type="text" value="{$row.height}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-picture" class="control-label col-xs-12 col-sm-2">{:__('Picture')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-picture" class="form-control" size="50" name="picture" type="text" value="{$row.picture}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-picture" class="btn btn-danger plupload" data-input-id="c-picture" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-picture"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-picture" class="btn btn-primary fachoose" data-input-id="c-picture" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-picture"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-picture"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-link" class="control-label col-xs-12 col-sm-2">{:__('Link')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-link" class="form-control" name="link" type="text" value="{$row.link}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-start_time" class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="start_time" type="text" value="{:$row.start_time?date('Y-m-d H:i', $row.start_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-end_time" class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="end_time" type="text" value="{:$row.end_time?date('Y-m-d H:i', $row.end_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-sort" class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" class="form-control" name="sort" type="number" value="{$row.sort}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
